#pragma warning( disable: 4995 4996 )

#include <windows.h>
#include <strsafe.h>
#include <assert.h>

#include "BasicDataTypes.h"
#include "Collections.h"
#include "DirectoriesAndFiles.h"
#include "Forms.h"

#include "commctrl.h"
#include "Form1.h"
#include "Program.h"


// BUGBUG - need to capture comments here
// GoNative Replacement Hash: 488868A50379EFC83A2863DE410D3DA9178ED562
void Test_002::Form1::button1_Click()
{
	MessageBox::Show("Hi!");
	MessageBox::Show("Hello again", "Title Goes Here");
}


// BUGBUG - need to capture comments here
// GoNative Replacement Hash: D6756BE614D93F5D8B6647DA011C917F51292559
void Test_002::Form1::button2_Click()
{
	button2.Enabled = false;
	button1.Visible = false;
	button3.Visible = false;
	timer.Interval = 400;
	timer.Start( hWnd );
}


// BUGBUG - need to capture comments here
// GoNative Replacement Hash: A7BD40E24A48F25A09DEC6666F234967241DF5D0
void Test_002::Form1::timer_Tick()
{
	timer.Stop();
	button2.Enabled = true;
	button1.Visible = true;
	button3.Visible = true;
}


// BUGBUG - need to capture comments here
// GoNative Replacement Hash: E43EE6B5CB349307330949934005BC4EA2CB07C4
void Test_002::Form1::button3_Click()
{
	Close();
}


// BUGBUG - need to capture comments here
// GoNative Replacement Hash: E489128B50897A539E3B13249390D5341BED4649
void Test_002::Form1::Dispose(bool disposing)
{
/*
	if (disposing && (components != null))
	{
		components.Dispose();
	}
	base::Dispose(disposing);

	*/
}


// BUGBUG - need to capture comments here
// GoNative Replacement Hash: 9E0E664672C9C30F57B60C4EAEBB78FFF88002BE
void Test_002::Form1::InitializeComponent()
{
	timer.dwTickID = ID_FORM1_TIMER_TICK;
	button1.dwControlID = ID_FORM1_BUTTON1_CLICK;
	button2.dwControlID = ID_FORM1_BUTTON2_CLICK;
	button3.dwControlID = ID_FORM1_BUTTON3_CLICK;
	this->SuspendLayout();
	// 
	// button1
	// 
	this->button1.Location = Point(33, 25);
	this->button1.Name = "button1";
	this->button1.Size = Size(75, 23);
	this->button1.TabIndex = 0;
	this->button1.Text = "Say Hi";
	this->button1.UseVisualStyleBackColor = true;
	// 
	// button2
	// 
	this->button2.Location = Point(33, 68);
	this->button2.Name = "button2";
	this->button2.Size = Size(75, 23);
	this->button2.TabIndex = 1;
	this->button2.Text = "Do Timer";
	this->button2.UseVisualStyleBackColor = true;
	// 
	// button3
	// 
	this->button3.Location = Point(189, 223);
	this->button3.Name = "button3";
	this->button3.Size = Size(75, 23);
	this->button3.TabIndex = 2;
	this->button3.Text = "Close";
	this->button3.UseVisualStyleBackColor = true;
	// 
	// Form1
	// 
	this->AutoScaleDimensions = SizeF(6, 13);
//	this->AutoScaleMode = AutoScaleMode.Font;
	this->ClientSize = Size(284, 262);
	this->Controls.Add(&this->button3);
	this->Controls.Add(&this->button2);
	this->Controls.Add(&this->button1);
	this->Name = "Form1";
	this->Text = "Form1";
	this->ResumeLayout(false);
}


// BUGBUG - need to capture comments here
// GoNative Replacement Hash: 9F335F36BFF22306D44DF76A42797FFDA956FF22
Test_002::Form1::Form1()
{
	InitializeComponent();
}


void Test_002::Form1::OnCreate( HWND hWnd )
{
	this->hWnd = hWnd;
	SetWindowPos( hWnd, NULL, 0, 0, ClientSize.X + 20, ClientSize.Y + 30, SWP_NOMOVE|SWP_NOOWNERZORDER|SWP_NOZORDER );
	CreateChildren();
}

void Test_002::Form1::OnSize()
{
}

void Test_002::Form1::OnTimer( WPARAM wParam, LPARAM lParam )
{
	switch( wParam )
	{
		case ID_FORM1_TIMER_TICK:
			timer_Tick();
			break;
	}
}

void Test_002::Form1::OnCommand( WPARAM wParam, LPARAM lParam )
{
	Debug::WriteLine( string("OnCommand: ") + ((int)LOWORD(wParam)) + "\n" );
	switch( LOWORD( wParam ) )
	{
		case ID_FORM1_BUTTON1_CLICK:
			button1_Click();
			break;
		case ID_FORM1_BUTTON2_CLICK:
			button2_Click();
			break;
		case ID_FORM1_BUTTON3_CLICK:
			button3_Click();
			break;
	}

}

void Test_002::Form1::OnActivate()
{
}

void Test_002::Form1::OnPaint()
{
	PAINTSTRUCT	ps;
	HDC		hdc;

	hdc = BeginPaint(hWnd, &ps);
	EndPaint(hWnd, &ps);
}

void Test_002::Form1::OnDestroy()
{
}



